/**   
 * @Title: PreferencesManager.java 
 * @Package android.framework.media 
 * @Description: TODO
 * @author jtf@163.com   
 * @date 2013-7-19 下午4:03:11 
 * @version V1.0   
 */
package android.framework.media;

import android.content.Context;
import android.framework.App;

/**
 * @ClassName: PreferencesManager
 * @Description: TODO
 * @author jtf19@163.com
 * @date 2013-7-19 下午4:03:11
 * 
 */
public class PreferencesManager {

	private static final String AD_COOKIES = "ad_cookies";
	private static final String API = "API";
	private static final String CHANNEL_PAGE = "channel_page";
	private static final String DIALOG_MSG = "dialog_msg";
	private static final String DOWNLOAD_LOCATION = "download_location";
	private static final String HOME_PAGE = "home_page";
	private static final String PERSONAL_CENTER_SP_NAME = "personal_center";
	private static final String PUSH = "push";
	private static final String RECOMMEND = "recommend";
	private static final String SETTINGS = "settings";
	private static final String SHARE = "share";

	private static PreferencesManager instance = new PreferencesManager(
			App.getInstance());
	private Context context;

	private PreferencesManager(Context paramContext) {
		this.context = paramContext;
	}

	public static PreferencesManager getInstance() {
		return instance;
	}

	public boolean isFirstPlay() {
		return this.context
				.getSharedPreferences(SETTINGS, Context.MODE_PRIVATE)
				.getBoolean("firstPlay", true);
	}

	public void setFirstPlay(boolean isFirstPlay) {
		this.context.getSharedPreferences(SETTINGS, Context.MODE_PRIVATE)
				.edit().putBoolean("firstPlay", isFirstPlay).commit();
	}

}
